/*
----------------------------------------------------------------------------------------------------
This source file is part of the Gamut Framework
Copyright (c) 2007 by Ryan Holcombe

This program is free software; you can redistribute it and/or modify it under the terms of the GNU
Lesser General Public License as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
----------------------------------------------------------------------------------------------------
*/


#ifndef _IManager_h_
#define _IManager_h_

#include <string>


namespace Gamut
{
	/**
 		All game managers are derived from this class. Each manager's tick() function will be called each frame
	*/

	class IManager
	{
		protected:		

			//!< the name of the manager, must be hardcoded into the class
			std::string mName;

			//!< the manager priority (1 is low priority meaning it will be deleted first when the ManagerFactory is destroyed)
			unsigned int mPriority;
		
		public:

			/** Default Constructor
			*/
			IManager(const std::string& name, unsigned int priority) :
				mName(name), mPriority(priority) { }

			/**
				\brief all internal processing each frame takes place here
				\param[in] elapsed time in seconds since the last frame
			*/
			virtual void tick(double elapsed) = 0;


			/**
				\brief returns the value of mName
			*/
			const std::string& getName() { return mName; }


			/**
				\brief returns the value of mPriority
			*/
			unsigned int getPriority() { return mPriority; }
	};
}


#endif
